import React from 'react';
import { Space, Table, Tag, Checkbox } from 'antd';
import type { TableProps } from 'antd';

interface DataType {
    key: string;
    name: string;
    age: number;
    address: string;
    tags: string[];
}

const columns: TableProps<DataType>['columns'] = [
    {
        title: '行号',
        dataIndex: 'name',
        key: 'name',
        render: (text) => <a>{text}</a>,
    },
    {
        title: '选择',
        dataIndex: 'age',
        key: 'age',
        render: (_, record) => (
            <div size="middle">
                <Checkbox>1</Checkbox>
            </div>
        ),
    },
    {
        title: '检验项目组合',
        dataIndex: 'address',
        key: 'address',
    },
];

const data: DataType[] = [
    {
        name: 1,
        age: '',
        address: '尿液分析'
    }
];

const App: React.FC = () => <Table<DataType> scroll={{ x: 'max-content' }} pagination={false} columns={columns} dataSource={data} />;

export default App;
